<template>
    <Child :num="num" @fn="chanNum"></Child>
    <Child :num="num" @fn="chanNum1"></Child>
    <Child v-model:num="num"></Child>

</template>

<script lang='ts' setup>
import { ref } from 'vue'
import Child from './MyPageChild.vue'
let num = ref(20)

const chanNum = () => {
    num.value++
}

const chanNum1 = (val:number) => {
    num.value+=val
}

</script>
 
<style lang="less" scoped>
    
</style>